<%@ page language="java" import="java.util.*" import="java.io.FileOutputStream" import="org.apache.poi.hssf.usermodel.*" import="com.gxuwz.medical.domain.area.*" import="com.gxuwz.medical.domain.baoxiao.*" import="com.gxuwz.medical.domain.family.*"  import="com.gxuwz.medical.domain.person.*" import="com.gxuwz.medical.vo.*" import="com.gxuwz.medical.dao.*"  pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String msg= (String)request.getAttribute("msg");
List list = (List)request.getSession().getAttribute("list");
%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/medical/css/pintuer.css">
<link rel="stylesheet" href="/medical/css/admin.css">
<script src="/medical/js/jquery-1.4.4.min.js"></script>
<script src="/medical/js/pintuer.js"></script>
<script src="/medical/My97DatePicker/WdatePicker.js"></script>
<script src="/medical/js/my.js"></script>
<script>
$(function(){
	var message = "<%=msg%>";
	if (message!="null"){
		alert(message);
	}
});
function getexcel(){
	window.location.href="system/BaoxiaoServlet?method=getexcel";
}
function changesearch(){	
	var areacode = document.getElementById("areacode").value;
	var fullname = document.getElementById("fullname").value;
	var illname = document.getElementById("illname").value;
	var stime = document.getElementById("stime").value;
	var etime = document.getElementById("etime").value;
	window.location.href="system/BaoxiaoServlet?method=statistic&areacode="+areacode+"&fullname="+fullname+"&illname="+illname+"&stime="+stime+"&etime="+etime;	
}
</script>
</head>
<body> 
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
	<div class="panel-head"><strong class="icon-reorder">筛选条件</strong></div>
    <div class="padding border-bottom">
    <a  class="button border-main" onclick="getexcel()">导出为excel</a>
      <ul  class="search" style="padding-left:10px;">
       	  
  		  <li><span >行政区域：</span><input type="text" placeholder="请输入行政区域 " name="areacode" class="input" style="width:150px; line-height:17px;display:inline-block" id="areacode"/></li>
  		  <li><span >姓名：</span><input type="text" placeholder="请输入姓名 " name="fullname" class="input" style="width:150px; line-height:17px;display:inline-block" id="fullname"/></li>
  		  <li><span >病种：</span><input type="text" placeholder="请输入病种" name="illname" class="input" style="width:150px; line-height:17px;display:inline-block" id="illname"/></li>
  		  <li><span >开始时间：</span><input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" type="text" placeholder="请选择开始时间" name="stime" class="input" style="width:150px; line-height:17px;display:inline-block" id="stime"/></li>
  		  <li><span >结束时间：</span><input onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})" type="text" placeholder="请选择开始时间" name="etime" class="input" style="width:150px; line-height:17px;display:inline-block" id="etime"/></li>
          <li><a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
      </ul>
    </div>
  
    <table  class="table table-hover text-center">
      <tr>
       <th width="100" style="text-align:left; padding-left:20px;">序号</th>
        <th>报销编号</th>
        <th>镇</th>
        <th>村</th>
        <th>组</th>
        <th>身份证号</th>
        <th>姓名</th>
        <th>慢性病名称</th>

        <th>实际报销金额</th>
        <th>报销时间</th>
      </tr>
      <volist name="list" id="vo">
    	<%	
    		
    		if(list!=null){
    			for(int i=0;i<list.size();i++){
    				BaoxiaoStatistic bs = new BaoxiaoStatistic();
    				bs=(BaoxiaoStatistic)list.get(i);
    				BaoXiao bx = bs.getBaoxiao();
    				Person person = bs.getPerson();
    				Family family = bs.getFamily();
    				%>
  		<tr>
  		<td style="text-align:left; padding-left:20px;">
  		<%=i+1 %></td>
          <td><%=bx.getBaoxiaono() %></td>
          <td><%=family.getTown() %></td>
          <td><%=family.getVillage() %></td>
          <td><%=family.getGroup() %></td>
          <td><%=bx.getIdcard() %></td>
          <td><%=person.getFullname()%></td>
          <td><%=bx.getIllname() %></td>
          <td><%=bx.getRelmoney() %></td>
          <td><%=bx.getBaoxiaotime() %></td>
        </tr>  				
    				<% 
    			}
    		}
    	 %>    

    </table>
  </div>
</form>

</body>
</html>